package com.demo.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public interface BaseService<T> {

	List<T> select(T record);
	
	T selectByPrimaryKey(Object key);
	
	List<T> selectAll();
	
	T selectOne(T record);
	
	int selectCount(T record);
	
	int insert(T record);
	
	int insertSelective(T record);
	
	int updateByPrimaryKey(T record);
	
	int updateByPrimaryKeySelective(T record);
	
	int delete(T record);
	
	int deleteByPrimaryKey(Object key);
	
	List<T> selectByExample(Object example);
	
	int selectCountByExample(Object example);
	
	int updateByExample(@Param("record") T record, @Param("example") Object example);
	
	int updateByExampleSelective(@Param("record") T record, @Param("example") Object example);
	
	int deleteByExample(Object example);
	
	List<T> selectByRowBounds(T record, RowBounds rowBounds);
	
	List<T> selectByExampleAndRowBounds(Object example, RowBounds rowBounds);
	
    
}
